home *** CD-ROM | disk | FTP | other *** search
/ Tiger Disk 85 / Tiger_Disk_085_20xx_Tiger-Crew-Disk_de_Side_B.d64 / roemische zahlen (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  583b  |  30 lines

  1. 100 poke53280,6:poke53281,.:print"[147]"
  2. 105 z$="":input" welche zahl umrechnen ";z$
  3. 106 ifz$=""thenend
  4. 110 z=val(z$):print"  =  ";
  5. 120 b=z
  6. 130 ifb<=3000then200
  7. 140 print"zu gross":goto105
  8. 200 goto500
  9. 210 b=int(z/f)
  10. 220 ifb<>0thengosub1000
  11. 230 z=z-b*f
  12. 240 return
  13. 500 f=1000:a$="m":gosub 210
  14. 510 f=900: a$="cm":gosub 210
  15. 520 f=500: a$="d":gosub 210
  16. 530 f=400: a$="cd":gosub 210
  17. 540 f=100: a$="c":gosub 210
  18. 550 f=90: a$="xc":gosub 210
  19. 560 f=50: a$="l":gosub 210
  20. 570 f=40: a$="xl":gosub 210
  21. 580 f=10: a$="x":gosub 210
  22. 590 f=9: a$="ix":gosub 210
  23. 600 f=5: a$="v":gosub 210
  24. 610 f=4: a$="iv":gosub 210
  25. 620 f=1: a$="i":gosub 210
  26. 630 poke198,0:wait198,1:poke198,0:goto100
  27. 1000 fori=1tob
  28. 1010 print a$;
  29. 1020 next i: return
  30.